package com.dong.bean;

import com.dong.config.T030LifeCycleConfig;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * 用于测试BeanPostProcessor
 * @see  T030LifeCycleConfig
 */
public class MyBeanPostProcessor implements BeanPostProcessor {

    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("MyBeanPostProcessor          --->  postProcess---------------->BeforeInitialization + -----------------> "+beanName);
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("MyBeanPostProcessor          --->  postProcess---------------->AfterInitialization+ -----------------> "+beanName);
        return bean;
    }
}
